//
//  RMMOrderEmptyView.m
//  Romomo
//
//  Created by puman on 2016/10/21.
//  Copyright © 2016年 mazegong. All rights reserved.
//

#import "RMMOrderEmptyView.h"

@implementation RMMOrderEmptyView

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = kWhiteColor;
        UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.width / 2 - 60, 100, 120, 120)];
        imageView.image = [UIImage imageNamed:@"订单-空@3x"];
        [self addSubview:imageView];
        
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, imageView.bottom, self.width, kMaric + kRow)];
        label.text = @"您还没有下过订单";
        label.textColor = COLORFROMCODE(0xBFBFBF, 1);
        label.textAlignment = NSTextAlignmentCenter;
        label.font = kFont(14);
        [self addSubview:label];
        
        _button = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _button.frame = CGRectMake(kScreenWideth / 2 - 60, label.bottom, 120, 40);
        _button.backgroundColor = kBasicColor;
        [_button setTitleColor:kWhiteColor forState:(UIControlStateNormal)];
        _button.titleLabel.font = kBFont(14);
        _button.layer.masksToBounds = YES;
        _button.layer.cornerRadius = kMaric;
        [_button setTitle:@"立即下单" forState:(UIControlStateNormal)];
        [self addSubview:_button];

    }
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
